home *** CD-ROM | disk | FTP | other *** search
/ Aminet 45 / Aminet 45 (2001)(GTI - Schatztruhe)[!][Oct 2001].iso / Aminet / game / role / ldmud-3.2-bin.lha / mud / doc / efun / call_out < prev    next >
Text File  |  2001-04-06  |  2KB  |  45 lines

  1. SYNOPSIS
  2.         void call_out(string fun, int delay, mixed arg, ...)
  3.         void call_out(closure cl, int delay, mixed arg, ...)
  4.  
  5. DESCRIPTION
  6.         Set up a call to function fun in the current object, or to
  7.         closure cl. The call will take place in delay seconds, with the
  8.         remaining argument list provided. delay can be a minimum time
  9.         of one second.
  10.         
  11.         call_out() saves and restores the current user. It is now
  12.         possible to use say() or write() which rely on a current
  13.         user to be something useful.
  14.  
  15.         call_out() can only call functions which are publicly accessible,
  16.         i.e. "public" and "static" functions. "private" and "protected"
  17.         functions can't be called.
  18.  
  19.         The execution of the call_out()s implies a simple (not
  20.         exhaustive) measure against rabbits: the evaluation costs of
  21.         those call_outs() executing at the same time are summed up on
  22.         a per-user base. If the summed-up costs exceed the given maximum,
  23.         a 'too long evaluation' error will occur and any remaining
  24.         call_outs() of this user scheduled for the same time are
  25.         discarded.
  26.  
  27. EXAMPLE
  28.         call_out("RefreshMe", 10);
  29.         
  30.         This will call the function RefreshMe() in 10 seconds without
  31.         any arguments. The function RefreshMe() can then call out
  32.         itself again which will result in a loop (not in a recursion)
  33.         which can be used to check or set up things in the object in
  34.         intervals. Be aware that callouts are stored in a linear
  35.         list, and so are somewhat expensive for the driver.
  36.  
  37.         And YES: self-replicating call_out()s, where each call_out()
  38.         creates two or more other call_out()s in a loop (so called
  39.         'rabbits') slow the mud down very fast, and are even able
  40.         to crash it. No need to try it yourself.
  41.  
  42. SEE ALSO
  43.         remove_call_out(E), call_out_info(E), find_call_out(E),
  44.         this_player(E), reset(A), heart_beat(A)
  45.